package com.caesar.practice;

/**
 * @author caesar
 * @date 2025/7/9
 * @Description:
 * @apiNote
 */
public class TestRest {
    public static void main(String[] args) {
            Rest[] arr = new Rest[3];
            arr[0] = new Rest() {
                @Override
                public void rest() {
                    System.out.println("休息就是睡大觉");
                }
            };

            arr[1] = new Rest() {
                @Override
                public void rest() {
                    System.out.println("休息就是到处浪");
                }
            };

            arr[2] = new Rest() {
                @Override
                public void rest() {
                    System.out.println("休息就是偷偷学习");
                }
            };

            for (int i = 0; i < arr.length; i++) {
                arr[i].rest();
            }
        }


}
